{#include file="top.php"#}
<div class="body">
    <div class="main">

        <div class="basic_info irpopbox  b_box">
            <div class="hd">
                <h2 class="ht">imore會員登入</h2>
            </div>
            <div class="bd">
                <form id="form1" enctype="multipart/form-data" action="member.php?action=login_imore" method="POST">
                    <div class="basic_info_box">
                        <!--p class="c_title">
                                註冊成為一般會員
                        </p-->
                        <p class="name_p">會員名稱 USERNAME</p>
                        <input type="text" class="info_ipt_text" name="email" id="email" onKeyDown="javascript: if(event.keyCode == 13) check_register();" />
                        <p class="tip" id="email_tip" style="display:none;">
                            <em class="hack"></em>
                            <a class="close" href="javascript:void(0);" onclick="$('#email_tip').hide();">close</a>
                            {#$NO_USERNAME#}
                        </p>
                        <p class="name_p" >密碼 PASSWORD</p>
                        <input type="password" class="info_ipt_text" name="password" id="password" onKeyDown="javascript: if(event.keyCode == 13) check_register();" />
                        <p class="tip" id="password_tip" style="display:none;">
                            <em class="hack"></em>
                            <a class="close" href="javascript:void(0);" onclick="$('#password_tip').hide();"> close </a>
                            {#$NO_PASSWORD#}
                        </p>
                        <input name="toURL" type="hidden" value="{#$toURL#}" />
                        <a href="###" class="btn_s btn_s_login" onclick="check_register();"><strong>下一步</strong></a>
                        <ul class="infor_ul">
                            <li><a href="/member.php?action=forgetPassword">忘記密碼</a></li>
                            <li><a href="/member.php?action=reg&toURL=/">註冊新帳號</a></li>
                        </ul>
                    </div>
                </form>
                <div class="other_login">
                    <div class="lgbox">
                        <em class="hack"></em>
                        <a href="/member.php?action=login_facebook&toURL={#$toURL#}" class="fbtn"><strong>綁定facebook</strong></a><p><a href="/member.php?action=login_facebook&toURL={#$toURL#}" class="fb_link">綁定facebook</a></p>
                    </div>
                    <div>
                        <em class="hack"></em>
                        <a href="/member.php?action=login_fnb&toURL={#$toURL#}" class="fabtn"><strong>以F&B登入 </strong></a><p><a href="member.php?action=login_fnb&toURL={#$toURL#}" class="fb_link">以F&B登入</a></p>
                    </div>
                </div>
            </div>
        </div>

    </div>

    <!-- main-->
    <div class="sidebar">
        {#show_block('b2',1,'','sidebar_ad')#}
        {#show_block('b1',2,'','sidebar_function')#}
        {#show_block('b3',0,'','sidebar_search')#}
        {#show_block('b6',0,'','sidebar_facebook')#}
    </div>
    <!-- sidebar -->

</div><!--body-->




<script>

    $(document).ready(function(){

        $('#email').mousedown(check_register_email);
        $('#email').keyup(check_register_email);

        $('#password').mousedown(check_register_password);
        $('#password').keyup(check_register_password);

    });
    function check_register_email(){
        var rt = 0;
        if($('#email').val().length==0){
            $("#email_tip").addClass("tip").show();
        }else {
            $("#email_tip").removeClass("tip").hide();
            rt =  1;
        }
        return rt;
    }
    function check_register_password(){
        var rt = 0;
        if($('#email').val().length==0){
            $("#email_tip").addClass("tip").show();
        }else {
            $("#email_tip").removeClass("tip").hide();
            rt =  1;
        }
        return rt;
    }

    function check_cssby(tipmainname){

        var obj =$("#"+tipmainname+"_tip");
        if(obj.attr('class')!='wrong'){
            return 1;
        }else{
            return 0;
        }
    }
    function check_register(){
        if($('#email').val().length==0){
            $('#email').focus();
            //alert("{#$NO_USERNAME#}");
            $('#email_tip').show();
            return false;
        }else if($('#password').val().length==0){
            $('#password').focus();
            //alert("{#$NO_PASSWORD#}");
            $('#password_tip').show();
            return false;
        }else{
            /*
                        var captcha=$('#captcha').val();
                        $.get("{#$selfurl#}?action=ajax_checkCaptcha",{captcha:captcha},function(data){
                                if(data=='false'){
                                        alert("{#$ERR_CAPTCHA#}");
                                        $('#captcha').focus();
                                        $('#captcha_img').attr("src","captcha.php?t="+Math.random());
                                        return false;
                                }else{
                                        $("#form1").submit();
                                }
                        });
             */
            $("#form1").submit();
        }
    }
    $(document).ready(function(){
        $('#email').focus();
    });
</script>
{#include file="footer.php"#}